import java.util.*;

public class demo2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNext()) { // 注意 while 处理多个 case
            String s1 = in.nextLine();
            String s2 = in.nextLine();
            Set<String> set = new HashSet<>();
            for (int i = 0; i < s1.length();) {
                if (s1.charAt(i) == '\"') {
                    int index = s1.indexOf('\"',i+1);
                    String temp = s1.substring(i + 1, index);
                    set.add(temp);
                    i = index + 2;
                } else {
                    int index = s1.indexOf(',',i);
                    if (index == -1) {
                        String temp = s1.substring(i);
                        set.add(temp);
                        break;
                    } else {
                        String temp = s1.substring(i, index);
                        set.add(temp);
                        i = index + 1;
                    }
                }
            }
            if (set.contains(s2)) {
                System.out.println("Ignore");
            } else {
                System.out.println("Important!");
            }
        }
    }
}
